<div class="widget-box">
<div class="widget-title">
    <span class="icon"><i class="icon-wrench"></i></span>
    <h5>Configuración</h5>
</div>
<div class="widget-content">
<?php
if (!empty($data_config)){
    $id_config = $data_config->id_config;
    $title_site = $data_config->title_site;
    $contact_email = $data_config->contact_email;
    $desc_site = $data_config->desc_site;
    $dire_email = $data_config->dire_site;
    $tel_email = $data_config->tel_site;
}

//atributos form datos
$atrFrm = array('class' => 'form-horizontal', 'id' => 'frm_config_gral');
$atrInptitle = array('class' => 'input-xxlarge','type' => 'text','name' =>'title_site','value' => $title_site);
$atrInpDesc = array('class' => 'input-xxlarge','type' => 'text','name' =>'desc_site','value' => $desc_site);
$atrInpDire = array('class' => 'input-xxlarge','type' => 'text','name' =>'dire_site','value' => $dire_email);
$atrInpTel = array('class' => 'input-xxlarge','type' => 'text','name' =>'tel_site','value' => $tel_email);
$atrInpEmail = array('class' => 'input-xxlarge','type' => 'text','name' =>'contact_email','value' => $contact_email);
$atrInpIdConfig = array('name' =>'id','type'=> 'hidden','value' => $id_config);
$atributos = array( 'class' => 'control-label');
$atrBtn = array('class' => 'btn btn-inverse','type' => 'submit');

//atributos form upload
$atr_Frmuploadlogo = array('class' => 'form-search');
$atrInplogo = array('class' => '','type' => 'file','name' =>'userfile');
$atrBtnup= array('class' => 'btn btn-success btn-small','type' => 'submit');
?>
<div class="control-group">
    <div class="controls">
        <?php
        //formulario upload logo
        echo form_open_multipart('upload/upload_logo',$atr_Frmuploadlogo);
        echo form_fieldset('Logo del sitio');
        echo form_upload($atrInplogo);
        echo form_button($atrBtnup,'Actualizar logo');
        echo form_input($atrInpIdConfig);
        echo form_fieldset_close(); 
        echo form_close();
        ?>
    </div>
</div>
<?php
//formulario de datos
echo form_open('admin/update_config_gral',$atrFrm);
echo form_fieldset('Información general');
?>
<p class="muted">Encabezado del sitio</p>
    <div class="control-group">
          <?php echo form_label('Título general del sitio','',$atributos);?>
        <div class="controls">
            <?php echo form_input($atrInptitle); ?>
        </div>
    </div>
    <div class="control-group">
          <?php echo form_label('Descripción','',$atributos);?>
        <div class="controls">
            <?php echo form_input($atrInpDesc); ?>
        </div>
    </div>
<p class="muted">Pie del sitio</p>
    <div class="control-group">
          <?php echo form_label('Dirección','',$atributos);?>
        <div class="controls">
            <?php echo form_input($atrInpDire); ?>
        </div>
    </div>
    <div class="control-group">
          <?php echo form_label('Teléfono','',$atributos);?>
        <div class="controls">
            <?php echo form_input($atrInpTel); ?>
        </div>
    </div>
    <div class="control-group">
          <?php echo form_label('Email de contacto','',$atributos);?>
        <div class="controls">
            <?php echo form_input($atrInpEmail); ?>
        </div>
    </div>

<?php
echo form_input($atrInpIdConfig);
echo form_button($atrBtn,'Guardar Cambios');
echo form_fieldset_close(); 
echo form_close();

//mensaje de exito
if(!empty($mensaje)):?><div class="span5 alert alert-info" id="mensaje"><?php echo $mensaje ?></div><?php endif; 
//Mensaje de error
if(!empty($error)): ?> <div class="span3 alert alert-error" id="error"><?php echo $error ?></div><?php endif;
?>
</div>
</div>